package com.acme.bankapp.domain.bank;


public class Client {
	
	private String name;
	private Gender gender;
	private int num;
	private int maxNumAccounts = 1;
	private AbstractAccount[] accounts;
		
	public Client(AbstractAccount account, double amount, String name, Gender g) {
		accounts = new AbstractAccount [maxNumAccounts];
		accounts[0] = account;
		accounts[0].setBalance(amount);
		this.name = name;
		gender = g;
	}
	
	public Client(AbstractAccount account, double amount) {
		this(account, amount, null, Gender.MALE);
	}
	
	public Client() {
		this(null, 0, null, Gender.MALE);
	}
	
	public String getClientSalutation() {
		return gender.getGender() + name;
	}
	
	public String getClientName() {
		return name;
	}	
	
	public AbstractAccount getAccount (int num) {
		if (num > this.num) {
			return null;
		}
		return accounts[num]; 
	}

}
